- if is_officer?
  = error_messages_for("character")
  - form_tag(:controller => "characters", :action => :create) do
    %table
      %tr
        %td Name
        %td= text_field("character", "name", { :size => 40 })
      %tr
        %td Class
        %td= collection_select("character", "character_class_id", @classes, "id", "name")
      %tr
        %td
        %td= submit_tag("Create")
  %br

%table
  %tr
    - @classes.each do |c|
      - if c.characters.length > 0
        %td= image_tag(c.image)
  %tr
    - @classes.each do |c|
      %td{:valign => "top"}
        %table
          - c.characters.sort.each do |character|
            - if (is_officer? or character.active?)
              %tr= render(:partial => character, :locals => { :character => character })

%h3 DKP
- cache("characters/dkp_table") do
  %table
    %tr
      - @dkp_columns.each do |column|
        %td{:valign => "top"}
          %table
            - column.each do |character|
              %tr
                = render(:partial => character, :locals => { :character => character })
                %td= number_with_precision(character.dkp)
        